//
//  ViewHelper.h
//  ParkingManager
//
//  Created by zhangpei on 14/12/2.
//  Copyright (c) 2014年 ADTEC. All rights reserved.
//

#import <UIKit/UIKit.h>



typedef enum
{
    TextFieldTypeOfDefault,
    TextFieldTypeOfInsets,
    TextFieldTypeOfNonePerformAction,
}TextFieldType;



@interface ViewHelper : UIView

//生成纯色图片
+ (UIImage *)createImageWithColor:(UIColor *)color withSize:(CGSize)size;

//UIImageView
+ (UIImageView *)superView:(UIView *)superView withFrame:(CGRect)frame withImage:(UIImage *)image withBackgroundColor:(UIColor *)backgroundColor withUserInteractionEnabled:(BOOL)enabled;

//UITextField
+ (UITextField *)superView:(UIView *)supView withTextFieldType:(TextFieldType)textFieldType withFrame:(CGRect)frame withKeyboardType:(UIKeyboardType)keyboardType withPlaceholder:(NSString *)placeholder withSecureTextEntry:(BOOL)secureTextEntry withText:(NSString *)text withReturnKeyType:(UIReturnKeyType)returnKeyType withDelegate:(id)delegate withBackgroundColor:(UIColor *)backgroundColor withTextColor:(UIColor *)textColor withClearButtonMode:(UITextFieldViewMode)mode withFont:(UIFont *)font withTextAlignment:(NSTextAlignment)textAlignment;

//UILabel
+ (UILabel *)superView:(UIView *)supView withFrame:(CGRect)frame  withText:(NSString *)text withBackgroundColor:(UIColor *)backgroundColor withTextColor:(UIColor *)textColor withFont:(UIFont *)font withTextAlignment:(NSTextAlignment)textAlignment;

//UIButton
+ (UIButton *)superView:(UIView *)superView withFrame:(CGRect)frame withNormalImage:(UIImage *)normalImage withNormalBackgroundImage:(UIImage *)normalBackgroundImage withBackgroundColor:(UIColor *)backgroundColor withTitle:(NSString *)title withFont:(UIFont *)font withTag:(NSInteger)tag withTitleColor:(UIColor *)titleColor withTitleAlignment:(NSTextAlignment)titleAlignment;

@end
